<div class="col-lg-6">
  <div class="panel panel-primary">
    <div class="panel-heading">服务注册</div>
    <div class="panel-body" ng-init="send('spider.index', {})">
      <p>每个聚合服务都是一个独立的应用服务，需要符合 Msgpack RPC 调用服务标准。
        <a class="pull-right" ui-sref="setting.spider.new" title="新爬虫"><i class="fa fa-plus-square-o fa-2x"></i></a>
      </p>

      <hr>

      <div class="row">
        <div class="col-lg-10 pull-right">
          <div ui-view></div>
        </div>
      </div>

      <div ng-switch on="spider_index.length">
        <p class="text-warning" ng-switch-when="0">
          <i class="fa fa-exclamation-circle fa-4x"></i>
          <span>
            目前还没有已经登记注册的聚合服务，请点击右上方的 <i class="fa fa-plus-square-o fa-2x"></i> 号开始操作。
          </span>
        </p>

        <div ng-switch-default>
          <div class="text-info">
            <h5><b>聚合服务</b></h5>
          </div>

          <table class="table table-hover">
            <tr ng-repeat="e in spider_index">
              <td style="width: 5%;"><i class="fa fa-tag"></i></td>
              <td style="width: 40%;"><b>{{e.name}}</b></td>
              <td style="width: 50%;">
                <small ng-show="{{(e.descr != 'undefined') && (e.descr.length > 0)}}">{{e.descr}}, </small>
                <small>由 {{e.url}} 调用服务</small>
              </td>
              <td style="width: 5%;">
                <a href ng-click="send('spider.destroy', { id: e.id });">
                  <i class="fa fa-trash text-danger pull-right"></i>
                </a>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
